package com.shadow.baiqun.delegate.send.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shadow.baiqun.R;
import com.shadow.baiqun.delegate.send.detail.SendDetailEntity;

import java.util.List;

/**
 * @author zhangyu
 * @date 2018/7/26
 */

public class SendDetailAdapter extends BaseQuickAdapter<SendDetailEntity, BaseViewHolder> {
    public SendDetailAdapter(int layoutResId, @Nullable List<SendDetailEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SendDetailEntity item) {
        helper.setText(R.id.et_part_code, item.getPartsNum());
        helper.setText(R.id.et_part_count, item.getCarTotalnum());
        helper.setText(R.id.et_group, item.getBatch());
        helper.setText(R.id.et_station, item.getDepoteName());
        helper.setText(R.id.et_supplier_code, item.getSupportNum());
        helper.setText(R.id.et_factory, item.getPayFac());
        helper.setText(R.id.et_send_time, item.getCarTime());
        helper.setText(R.id.tv_position, (helper.getLayoutPosition() + 1) + "/" + getItemCount());
    }
}
